package com.blockchainenergy.info.line;

import com.blockchainenergy.common.CarbonTools;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class Line {
    private Integer derection;
    private Integer i;
    private Integer j;
    private Integer color;
    private Double e;// 碳流密度
    private Double outFlow;// 碳流量

    public Line(Integer i, Integer j) throws Exception {
        this.derection = CarbonTools.derection(i, j);
        this.i = i;
        this.j = j;
        this.color = CarbonTools.erank(i);
        this.e = CarbonTools.currente(i);
        this.outFlow = CarbonTools.outflow(i)[7];
    }
}
